let imgUrl = 'http://img.hexinle.top/healthySupervision/static/index/classify/'

// module.exports 表示模块对外输出的值。
// module.filename 模块的文件名，带有绝对路径。
// module.loaded 返回一个布尔值，表示模块是否已经完成加载。
// module.children 返回一个数组，表示该模块要用到的其他模块。
// module.parent 返回一个对象，表示调用该模块的模块。

module.exports = {
	// 打卡项目
	local_project : [
		{en_name:'eraturejson',name:'体温',img:imgUrl+'ydk/体温.png',},
		{en_name:'breajson',name:'呼吸',img:imgUrl+'ydk/呼吸.png',},
		{en_name:'pulsejson',name:'脉搏',img:imgUrl+'ydk/脉搏.png',},
		{en_name:'pressjson',name:'血压',img:imgUrl+'ydk/血压.png',},
		{en_name:'dietjson',name:'进餐',img:imgUrl+'ydk/进餐.png',},
		{en_name:'exerjson',name:'运动',img:imgUrl+'ydk/运动.png',},
		{en_name:'learnjson',name:'学习',img:imgUrl+'ydk/学习.png',},
		{en_name:'tobajson',name:'烟酒',img:imgUrl+'ydk/烟酒.png',},
		{en_name:'sleepjson',name:'睡眠',img:imgUrl+'ydk/睡眠.png',},
		{en_name:'cacation',name:'排便',img:imgUrl+'ydk/排便.png',},
		{en_name:'driving',name:'驾车',img:imgUrl+'ydk/驾车.png',},
	],
	
	// 项目下的具体内容
	local_project_content:{
		// 体温
		eraturejson:[
			{status:'eraturejson',isSlider:true,selectVal:'35',searchVal:'体温',tit:'您的体温是多少度？',name:'体温',arr:dataGeneration(35,46,8)},
		],
		
		// 呼吸
		breajson:[
			{status:'breajson',isSlider:true,selectVal:'16',searchVal:'呼吸',tit:'每分钟呼吸次数？',name:'呼吸',arr:dataGeneration(16,24,8)},
		],
		
		// 脉搏
		pulsejson:[
			{status:'pulsejson',isSlider:true,selectVal:'10',searchVal:'脉搏',tit:'每分钟跳几下？',name:'脉搏',arr:dataGeneration(10,200,8)},
		],
		
		// 血压
		pressjson:[
			{status:'pressjson',isSlider:true,selectVal:'90',searchVal:'血压',tit:'收缩压是多少？',name:'血压-收缩压',arr:dataGeneration(90,140,8)},
			{status:'pressjson',isSlider:true,selectVal:'60',searchVal:'血压',tit:'舒张压是多少？',name:'血压-舒张压',arr:dataGeneration(60,90,8)},
		],
		
		// 饮食
		dietjson:[
			{status:'dietjson',isSlider:false,selectVal:'',searchVal:'进餐',tit:'您早餐吃的什么？',name:'进餐-早餐',arr:b_check(['米饭','面条','肉','蛋','蔬','果','酒','汤','粥','饼','饺','汤圆','糯粽','油条','生鲜','豆制品',])},
			{status:'dietjson',isSlider:false,selectVal:'',searchVal:'进餐',tit:'您中餐吃的什么？',name:'进餐-中餐',arr:b_check(['米饭','面条','肉','蛋','蔬','果','酒','汤','粥','饼','饺','汤圆','糯粽','油条','生鲜','豆制品',])},
			{status:'dietjson',isSlider:false,selectVal:'',searchVal:'进餐',tit:'您晚餐吃的什么？',name:'进餐-晚餐',arr:b_check(['米饭','面条','肉','蛋','蔬','果','酒','汤','粥','饼','饺','汤圆','糯粽','油条','生鲜','豆制品',])},
			{status:'dietjson',isSlider:false,selectVal:'',searchVal:'进餐',tit:'您夜餐吃的什么？',name:'进餐-夜餐',arr:b_check(['米饭','面条','肉','蛋','蔬','果','酒','汤','粥','饼','饺','汤圆','糯粽','油条','生鲜','豆制品',])},
		],
		
		// 运动
		exerjson:[
			{status:'exerjson',isSlider:false,selectVal:'',searchVal:'运动',tit:'您的运动方式?',name:'运动-方式',arr:b_check(['步行', '跑步', '巨烈竞技体育运动（如：乒乓球、蓝球、足球类）', '太极类', '传统武术类', '瑜珈类', '广场舞类', '跳绳', '轮滑', '骑行类', '游泳类', '登山', '禅坐冥想'])},
			{status:'exerjson',isSlider:false,selectVal:'',searchVal:'运动',tit:'您的运动时段?',name:'运动-时段',arr:b_check(['早/4 时、5 时、6 时、7 时、', '中', '晚', '夜',},
			{status:'exerjson',isSlider:false,selectVal:'',searchVal:'运动',tit:'您的运动环境?',name:'运动-环境',arr:b_check(['室内','广场','公园','野外'])},
			{status:'exerjson',isSlider:true,selectVal:'20',searchVal:'运动',tit:'您的运动时长?',name:'运动-时长',arr:dataGeneration(20,80,5)},
		],
		
		// 学习
		learnjson:[
			{status:'learnjson',isSlider:true,selectVal:'1',searchVal:'学习',tit:'早上看书学习几个小时?',name:'学习-看书-早',arr:dataGeneration(1,24,5)},
			{status:'learnjson',isSlider:true,selectVal:'1',searchVal:'学习',tit:'中午看书学习几个小时?',name:'学习-看书-中',arr:dataGeneration(1,24,5)},
			{status:'learnjson',isSlider:true,selectVal:'1',searchVal:'学习',tit:'晚上看书学习几个小时?',name:'学习-看书-晚',arr:dataGeneration(1,24,5)},
			{status:'learnjson',isSlider:true,selectVal:'1',searchVal:'学习',tit:'早上手机学习几个小时?',name:'学习-手机-早',arr:dataGeneration(1,24,5)},
			{status:'learnjson',isSlider:true,selectVal:'1',searchVal:'学习',tit:'中上手机学习几个小时?',name:'学习-手机-中',arr:dataGeneration(1,24,5)},
			{status:'learnjson',isSlider:true,selectVal:'1',searchVal:'学习',tit:'晚上手机学习几个小时?',name:'学习-手机-晚',arr:dataGeneration(1,24,5)},
		],
		
		// 烟酒
		tobajson:[
			{status:'tobajson',isSlider:true,selectVal:'10',searchVal:'烟酒',tit:'您平时白酒喝多少ml?',name:'酒-白酒',arr:dataGeneration(10,90,10)},
			{status:'tobajson',isSlider:true,selectVal:'10',searchVal:'烟酒',tit:'您平时啤酒喝多少ml?',name:'酒-啤酒',arr:dataGeneration(10,90,10)},
			{status:'tobajson',isSlider:false,selectVal:'',searchVal:'烟酒',tit:'您什么时候抽烟?',name:'烟-时间',arr:b_check(['早','中','晚','夜','独享','众享'])},
			{status:'tobajson',isSlider:false,selectVal:'',searchVal:'烟酒',tit:'您平时抽几支?',name:'烟-烟量',arr:b_check(['支','包'])},
			{status:'tobajson',isSlider:false,selectVal:'',searchVal:'烟酒',tit:'您平时抽的烟型?',name:'烟-烟型',arr:b_check(['粗','细','短'])},
		],
		
		// 睡眠
		sleepjson:[
			{status:'sleepjson',isSlider:false,selectVal:'',searchVal:'睡眠',tit:'您的入睡情况?',name:'睡眠-入睡状态',arr:b_check(['入睡难','入睡易'])},
			{status:'sleepjson',isSlider:false,selectVal:'',searchVal:'睡眠',tit:'您的夜休点?',name:'睡眠-夜休点',arr:b_check(['晚六点','七点','八点','九点','十点','十一点','十二点','凌晨1点','凌晨2点','凌晨3点','通霄未眠',])},
			{status:'sleepjson',isSlider:true,selectVal:'1',searchVal:'睡眠',tit:'您的入睡时间?',name:'睡眠-入睡时间',arr:dataGeneration(1,24,8)},
			{status:'sleepjson',isSlider:false,selectVal:'',searchVal:'睡眠',tit:'您是否有午休?',name:'睡眠-午休',arr:b_check(['有','无'])},
			{status:'sleepjson',isSlider:false,selectVal:'',searchVal:'睡眠',tit:'您是否有梦魇?',name:'睡眠-梦魇',arr:b_check(['有魇', '无魇', '多梦', '梦少', '无梦', '梦吉', '梦凶', '梦逝者', '醒后能忆，醒后难忆', '入睡即梦', '临醒方梦梦续'])},
		],
		
		// 排便（便溺）
		cacation:[
			{status:'cacation',isSlider:true,selectVal:'1',searchVal:'排便',tit:'您一天大便几次?',name:'排便-大便-次数',arr:dataGeneration(1,5,5)},
			{status:'cacation',isSlider:false,selectVal:'',searchVal:'排便',tit:'您排便时间?',name:'排便-大便-时间',arr:b_check(['早','中','晚'])},
			{status:'cacation',isSlider:false,selectVal:'',searchVal:'排便',tit:'您排便便型?',name:'排便-大便-便型',arr:b_check(['方','圆','细'])},
			{status:'cacation',isSlider:false,selectVal:'',searchVal:'排便',tit:'您排便便感?',name:'排便-大便-便感',arr:b_check(['干结', '溏稀', '泻泄', '粘腻', '尽', '不尽'])},
			{status:'cacation',isSlider:true,selectVal:'1',searchVal:'排便',tit:'您一天小便几次?',name:'排便-小便-次数',arr:dataGeneration(1,5,5)},
			{status:'cacation',isSlider:false,selectVal:'',searchVal:'排便',tit:'您的小便溺色?',name:'排便-小便-溺色',arr:b_check(['清长', '淡黄', '黄', '浓黄', '混', '赤'])},
			{status:'cacation',isSlider:false,selectVal:'',searchVal:'排便',tit:'您的小便是否有泡沫?',name:'排便-小便-泡沫',arr:b_check(['有', '无',])},
		],
		
		// 驾车里程数（x时间，x公里）
		driving:[
			{status:'driving',isSlider:true,selectVal:'0',searchVal:'驾车',tit:'您平时驾车多长时间?',name:'驾车-小时/公里',arr:dataGeneration(0,24,5)},
		]
	},

}

/**
	@min 开始
	@max 结束
	@mar 粒度
 */
function dataGeneration(min,max,mar){
	let fanl = (max - min) / (mar - 1)
	let arr = [min]
	for (let i = 1; i < mar; i++) {
		arr.push((fanl * i + min).toFixed(2)*1)
		if(arr.length == mar ){
			return arr
		}
	}
}

// 补多选情况
function b_check(arr){
	let arr1 = []
	arr.forEach(item=>{arr1.push({ischeck:false,name:item})})
	return arr1
}